home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / PNL010.ARJ / MAKE_ERR.PAS < prev    next >
Pascal/Delphi Source File  |  1992-03-01  |  4KB  |  94 lines

  1. Program Make_Error_descriptor_List;
  2. (*Copyright (c) 1992 KHIRON Software
  3.  
  4.   All rights reserved. KHIRON Software hereby grants
  5.   permission for free distribution of this software,
  6.   and for use of this software within commercial and
  7.   non-commercial applications. This software itself
  8.   may not be distributed commercially without obtaining
  9.   written permission from KHIRON Software.
  10.  
  11.   Should you use this software or it's techniques in commercial
  12.   products send me a postcard at the following address to fulfill
  13.   a licensing commitment:
  14.  
  15.     Richard A. Morris
  16.     C/- KHIRON Software
  17.     P.O. Box 544
  18.     INDOOROOPILLY Qld 4068
  19.     AUSTRALIA
  20. *)
  21. (* This program creates a resourcefile called Errors.Stm which contains a
  22.    tStringList containing standard Turbo Pascal RunTime Error descriptions
  23.    to provide information when your program exits with a runtime error
  24. *)
  25. Uses Objects;
  26. Procedure MakeStringList;
  27. Var
  28.   ErrorStrings : pStrListMaker;
  29.   ErrorStream  : pStream;
  30.   ErrorResource: pResourceFile;
  31. begin
  32.   ErrorStream := New(pBufStream,Init('ERRORS.STM',stCreate,1024));
  33.   ErrorResource := New(pResourceFile,Init(ErrorStream));
  34.   ErrorStrings := new(PStrListMaker,Init(65520,257));
  35.   ErrorStrings^.Put(0,'Program Terminated');
  36.   ErrorStrings^.Put(1,'Invalid DOS function code');
  37.   ErrorStrings^.Put(2,'File not found');
  38.   ErrorStrings^.Put(3,'Path not found');
  39.   ErrorStrings^.Put(4,'Too many open files');
  40.   ErrorStrings^.Put(5,'File access denied');
  41.   ErrorStrings^.Put(6,'Invalid file handle');
  42.   ErrorStrings^.Put(8,'Not enough memory');
  43.   ErrorStrings^.Put(10,'Invalid environment');
  44.   ErrorStrings^.Put(11,'Invalid format');
  45.   ErrorStrings^.Put(12,'Invalid file access code');
  46.   ErrorStrings^.Put(15,'Invalid drive number');
  47.   ErrorStrings^.Put(16,'Cannot remove current directory');
  48.   ErrorStrings^.Put(17,'Cannot rename across drives');
  49.   ErrorStrings^.Put(18,'No more files');
  50.   ErrorStrings^.Put(100,'Disk read error');
  51.   ErrorStrings^.Put(101,'Disk write error');
  52.   ErrorStrings^.Put(102,'File not assigned');
  53.   ErrorStrings^.Put(103,'File not open');
  54.   ErrorStrings^.Put(104,'File not open for input');
  55.   ErrorStrings^.Put(105,'File not open for output');
  56.   ErrorStrings^.Put(106,'Invalid numeric format');
  57.   ErrorStrings^.Put(150,'Disk is write-protected');
  58.   ErrorStrings^.Put(151,'Unknown unit');
  59.   ErrorStrings^.Put(152,'Drive not ready');
  60.   ErrorStrings^.Put(153,'Unknown command');
  61.   ErrorStrings^.Put(154,'CRC error in data');
  62.   ErrorStrings^.Put(155,'Bad Drive request structure length');
  63.   ErrorStrings^.Put(156,'Disk seek error');
  64.   ErrorStrings^.Put(157,'Unknown media type');
  65.   ErrorStrings^.Put(158,'Sector not found');
  66.   ErrorStrings^.Put(159,'Printer out of Paper');
  67.   ErrorStrings^.Put(160,'Device write fault');
  68.   ErrorStrings^.Put(161,'Device read fault');
  69.   ErrorStrings^.Put(162,'Hardware failure');
  70.   ErrorStrings^.Put(200,'Division by zero');
  71.   ErrorStrings^.Put(201,'Range check error');
  72.   ErrorStrings^.Put(202,'Stack overflow error');
  73.   ErrorStrings^.Put(203,'Heap overflow error');
  74.   ErrorStrings^.Put(204,'Invalid pointer operation');
  75.   ErrorStrings^.Put(205,'Floating point overflow');
  76.   ErrorStrings^.Put(206,'Floating point underflow');
  77.   ErrorStrings^.Put(207,'Invalid floating point operation');
  78.   ErrorStrings^.Put(208,'Overlay manager not installed');
  79.   ErrorStrings^.Put(209,'Overlay file read error');
  80.   ErrorStrings^.Put(210,'Object not initialised');
  81.   ErrorStrings^.Put(211,'Call to abstract method');
  82.   ErrorStrings^.Put(212,'Stream registration error');
  83.   ErrorStrings^.Put(213,'Collection index out of range');
  84.   ErrorStrings^.Put(214,'Collection overflow error');
  85.   ErrorResource^.Put(ErrorStrings,'ERRORDESC');
  86.   Dispose(ErrorResource,Done);
  87.   Dispose(ErrorStrings,Done);
  88. end;
  89. begin
  90.   Registertype(RStrListMaker);
  91.   MakeStringList;
  92.   Writeln('Errors.Stm created');
  93. end.
  94.